package com.bawei.detail.model

import com.bawei.common.entity.CommendEntity
import com.bawei.detail.api.DetailServerApi
import com.bawei.detail.entity.AuthorEntity
import com.bawei.network.BaseResponse
import javax.inject.Inject

/**
 * Author: Jason Zhang
 * Date: 2024/3/9
 * Desc:
 */
class DetailRepository @Inject constructor(private val apiServerApi: DetailServerApi){

    suspend fun getAuthorInfoById(userId: String): BaseResponse<AuthorEntity> {
        return apiServerApi.getAuthorById(userId)
    }

    suspend fun getMovieCommendById(dataType: Int, itemId: String): BaseResponse<List<CommendEntity>>{
        return apiServerApi.getCommentByUserId(dataType, itemId)
    }
}